<!-- $Id: adminPwd.html 10 2011-02-06 08:35:48Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<load href="__PUBLIC__/Js/validator.js" />
<script language="javascript">
/**
* 检查表单输入的数据
*/
function validate()
{
	validator = new Validator("theForm");
	
	/* *
	* 检查用户密码
	* 密码必须同时包含字母及数字且长度不能小于6
	* @param :  controlId   表单元素的ID
	* @param :  msg         错误提示信息
	*/
	validator.password = function (controlId, msg)
	{
		var obj = document.forms[this.formName].elements[controlId];
		obj.value = Utils.trim(obj.value);
		if (!(obj.value.length >= 6 && /\d+/.test(obj.value) && /[a-zA-Z]+/.test(obj.value)))
		{
		  this.addErrorMsg(msg);
		}	
	}  
	
	validator.required("old_password", "{$Think.lang.js_old_password}");
	validator.required("new_password", "{$Think.lang.js_new_password}");
	validator.password("new_password", "{$Think.lang.js_user_password}");
	validator.eqaul("new_password", "pwd_confirm", "{$Think.lang.js_pwd_confirm}");
	return validator.passed();
}
</script>
<div class="main-div">
  <form name="theForm" method="post" action="__URL__/changePwd/"  onsubmit="return validate()">
    <table width="100%">
      <tbody>
        <tr>
          <td width="50%" class="label">{$Think.lang.user_name}</td>
          <td width="50%">{@user_name}</td>
        </tr>
        <tr>
          <td class="label"><a href="javascript:showNotice('passwordNotic');" title="{$Think.lang.notic}"> <img src="__PUBLIC__/Images/notice.gif" alt="{$Think.lang.notic}" border="0" width="16" height="16"></a> {$Think.lang.old_password}</td>
          <td><input name="old_password" size="34" type="password">
            <span class="require-field">*</span> <br>
            <span class="notice-span" style="display: block;" id="passwordNotic">{$Think.lang.old_password_}</span></td>
        </tr>
        <tr>
          <td class="label">{$Think.lang.new_password}</td>
          <td><input name="new_password" maxlength="32" size="34" type="password">
            <span class="require-field">*</span></td>
        </tr>
        <tr>
          <td class="label">{$Think.lang.pwd_confirm}</td>
          <td><input name="pwd_confirm" value="" size="34" type="password">
            <span class="require-field">*</span></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input value=" {$Think.lang.submit} " class="button" type="submit">
            &nbsp;&nbsp;&nbsp;
            <input value=" {$Think.lang.reset} " class="button" type="reset"></td>
        </tr>
      </tbody>
    </table>
  </form>
</div>
<include file="Public:pagefooter"/> 